﻿<%<Hi:Common_Header runat="server"  />%>
<form runat="server">
<div class="main pt10">
<script src="http://res.juseshop.com/utility/validate/pagevalidator.js" type="text/javascript"></script>
<div class="re_friend_tab ">
	<table width="1160" border="0" cellspacing="0" cellpadding="0" align="center">
     <tr>
  
        <td width="230" class="re_blogit_pro_t" valign="top"> <b style="color:#DE3032; margin-left:-10px;">【你要向朋友推荐的产品】</b> </td>
        <td width="730" align="left" class="re_blogit_pro_t" ><%<asp:HyperLink runat="server" ID="hlinkProductOfTitle" />%></td>
 
      </tr>
        </table>
	<table width="1160" border="0" cellpadding="0" cellspacing="0" align="center">      
      <tr>
        <td colspan="4" align="center" valign="top" class="border_lr2">
		<div style="text-align:center;"><%<Hi:SmallStatusMessage id="Status" runat="server" Visible="False" />%></div>
        <table width="1160" border="0" cellpadding="0" cellspacing="0" style=" color:#2c2c2c;">
          <tr>
            <td  colspan="3" align="left" class="blogit_bottom_line1">发送推荐商品的电子邮件给朋友：</td>
            </tr>
          <tr>
            <td  height="10" colspan="3" align="left" > </td>
            </tr>
          <tr>
            <td width="90" height="33" align="left" style="font-size:14px;">好友的名字：</td>
            <td width="303" align="left" ><%<asp:TextBox ID="txtFriendName" runat="server" CssClass="input2" Width="290px" />%></td>
            <td width="567" align="left" style="color:#DE3032;"><div  style="width:400px;" id="txtFriendNameTip" runat="server"></div></td>
          </tr>
           <tr>
            <td height="10" colspan="3" align="left"> </td>
          </tr>
          <tr>
            <td height="33" align="left" style="font-size:14px;">好友的邮箱：</td>
            <td align="left" ><%<asp:TextBox ID="txtFriendEmail" runat="server" CssClass="input2"  Width="290px" />%></td>
            <td align="left" style="color:#DE3032;"><div style="width:400px;" id="txtFriendEmailTip" runat="server"></div></td>
          </tr>
          <tr>
            <td height="10" colspan="3" align="left"> </td>
          </tr>
          <tr>
            <td height="33" align="left" style="font-size:14px;">您的名字：</td>
            <td align="left" ><%<asp:TextBox ID="txtUserName" runat="server" CssClass="input2"  Width="290px" />%></td>
            <td align="left" style="color:#DE3032;"><div  style="width:400px;" id="txtUserNameTip" runat="server"></div></td>
          </tr>
          <tr>
            <td height="10" colspan="3" align="left"> </td>
            </tr>
          <tr>
            <td  align="left" valign="top" style="font-size:14px;">邮件内容：</td>
            <td colspan="2" align="left" valign="top" class="re_blogit_pro_area2">我在 <%<asp:HyperLink ID="hlinkHome" runat="server" />%>
	        网站上看到 <%<asp:HyperLink ID="hlinkProductOfContext" runat="server" />%> ，
	        快点出手吧 ，棒极了！你去看看吧！这个东东的网址是：<%<asp:Literal ID="litProductUrl" runat="server" />%>
	      </td>
          <tr>
            <td height="10" colspan="3" align="left"> </td>
          </tr>
          <tr>
            <td height="50" align="left" valign="top" style="font-size:14px;">您的留言：</td>
            <td colspan="2" align="left" valign="top"><%<asp:TextBox ID="txtMessage" runat="server" TextMode="MultiLine" CssClass="input2" Height="40" Width="300" />%><div id="txtMessageTip" runat="server" style="color:#DE3032; margin-bottom:5px;"></div></td>
          </tr>
          <tr>
            <td height="50" align="left" valign="top" style="font-size:14px;">验证码：</td>
            <td colspan="2" align="left" valign="top">
                <ul>
                    <li style="width:850px; overflow:hidden; margin-bottom:10px;" >                        
                        <span>
                             <input type=text id="txtTJCode" runat="server" style="width:50px; float:left;" class="input2" />&nbsp;<img id="img_txtNumber" src="" alt="" />
                            <a href="javascript:refreshTJCode();"  ><img id="imgTJVerifyCode" src='' style="border-style:none;" alt=""/></a>
                            <script language="javascript" type="text/javascript">
                                document.getElementById('imgTJVerifyCode').src = applicationPath + "/VerifyCodeImage.aspx";
                                function refreshTJCode() {
                                    var img = document.getElementById("imgTJVerifyCode");

                                    if (img != null) {
                                        var currentDate = new Date();
                                        img.src = applicationPath + "/VerifyCodeImage.aspx?t=" + currentDate.getTime();
                                    }
                                }
                            </script>
                        </span>
                    
                    </li>
                    <li ><%<asp:Button runat="server" ID="btnRefer" CssClass="btn_sub" OnClientClick="return PageIsValid();" ValidationGroup="valsIntroduced" Text="推荐" />%></li>
                </ul>
            </td>
          </tr>

        </table>        
      
        </td>
      </tr>
      <tr>
        <td colspan="4"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="yuanjiao_bottombg">
            <tr>
              <td align="left"><img src="/images/yuanjiao_bottom_left.jpg" width="3" height="4" /></td>
              <td></td>
              <td align="right"><img src="/images/yuanjiao_bottom_right.jpg" width="3" height="4" /></td>
            </tr>
        </table></td>
      </tr>
    </table>
	</div>

    <script type="text/javascript" language="javascript">
        function InitValidators() {
            initValid(new InputValidator('IntroducedToFriend_txtFriendName', 1, 30, false, null, '请输入好友的名字，不能为空长度限制在1-30之间'))
            initValid(new InputValidator('IntroducedToFriend_txtUserName', 1, 30, false,null,'请输入您的名字，不能为空长度限制在1-30之间'))
            initValid(new InputValidator('IntroducedToFriend_txtFriendEmail', 1, 256, false, '[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\.[\\w-]+)+','请输入正确好友邮箱，不能为空长度限制在1-256之间'))
            initValid(new InputValidator('IntroducedToFriend_txtMessage', 1, 30, false, null, '请输入您的留言，不能为空长度限制在1-300之间'))
        }
        $(document).ready(function () {
            InitValidators();
            $("#img_txtNumber").hide();
            $("#IntroducedToFriend_txtTJCode").keyup(function () {
                var value = $(this).val();
                if (value.length < 4) {
                    $("#img_txtNumber").hide();
                    temp = "";
                }
                else if (value.length == 4) {
                    if (temp != value) {
                        $("#img_txtNumber").show();
                        $.ajax({
                            url: "IntroducedToFriend.aspx",
                            type: 'post', dataType: 'json', timeout: 10000,
                            data: {
                                isCallback: "true",
                                code: $("#IntroducedToFriend_txtTJCode").val()
                            },
                            async: false,
                            success: function (resultData) {
                                var flag = resultData.flag;
                                if (flag == "1") {
                                    $("#img_txtNumber").attr("src", "/images/true.gif");
                                }
                                else if (flag == "0") {
                                    $("#img_txtNumber").attr("src", "/images/false.gif");
                                }
                            }
                        });
                    }
                    temp = value;
                }
            });
        });
    </script>
</div>
</form>
<%<hi:common_new_footer runat="server" />%>


